package uTatrusTests;

import static org.junit.Assert.*;

import org.junit.After;
import org.junit.AfterClass;
import org.junit.Before;
import org.junit.BeforeClass;
import org.junit.Test;
/**
 * <p>Title: Board.class Unit Tests </p>
 * <p>Description: CSIS 343 Course Project</p>
 * 
 * @author Nick Brown
 * @email  nicholas.brown@my.uwrf.edu
 * @author John Wagner 
 * @email  john.wagner@my.uwrf.edu
 * 
 * @date December 1st 2013
 *
 */

public class BoardTests {
	//instance of board b
	private tatrus.Board b;
	
	/**
	 * @throws java.lang.Exception
	 */
	@BeforeClass
	public static void setUpBeforeClass() throws Exception {
	}

	/**
	 * @throws java.lang.Exception
	 */
	@AfterClass
	public static void tearDownAfterClass() throws Exception {
	}

	/**
	 * Sets up new instance of a board with anonymous
	 * classes to be able to check if board is clear
	 * @throws java.lang.Exception
	 */
	@Before
	public void setUp() throws Exception {
	b = new tatrus.Board(new tatrus.Game(), new tatrus.Display(new tatrus.Game()));
	}

	/**
	 * Tears down GUI after each test pass
	 * @throws java.lang.Exception
	 */
	@After
	public void tearDown() throws Exception {
		b = null;
	}

	/**
	 * Test method for {@link tatrus.Board#checkAllRows()}.
	 * Checks to make sure at new game, all rows are clear and
	 * we have nothing within the game board.
	 */
	@Test
	public final void testCheckAllRows() {
		assertEquals(0, b.checkAllRows());
	}
	/**
	 * Test method for {@link tatrus.Board#rowIsFull(int)}.
	 * Will test to check if there is something in row (0) which should
	 * hole a shape instance.
	 */
	@Test
	public final void testRowIsFull() {
		assertEquals(false, b.rowIsFull(0));
		}

}
